﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ForumPostThanksEdit.ascx.cs" Inherits="Micronet.OpenWeb.OpenWeb.Admin.Views.Shared.Forum.ForumPostThanksEdit" %>
<owc:OwDetailsView ID="ForumPostThanksEditDV" runat="server" AutoGenerateRows="False" DataSourceID="ForumPostThankEditOds" DataKeyNames="ForumPostThanksID"
    EnableModelValidation="True" OwNotificationID="" SkinID="DetailViewAdmin">
    <Fields>
        <asp:TemplateField>
            <InsertItemTemplate>                
                <fieldset>
                    <legend><span>
                        <owc:OwR ID="InfoLabel" runat="server" OwText="InfoLabel"></owc:OwR>
                    </span></legend>
                    <div>
                        <table width="100%">     
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="OwUserName" runat="server" OwText="UserName" />
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtUser" runat="server" Enabled="False" Width="200px"
                                        OwUsedForEdit="False" Text='<%#Eval("UserID")!=null? (Membership.GetUser(Eval("UserID"))!=null?Membership.GetUser(Eval("UserID")).UserName:"n/a"):"n/a"  %>'>
                                    </owc:OwTextBox>
                                    <owc:OwTextBox SkinID="owTextBox" OwDefaultValue='<%# Membership.GetUser()!=null ? Membership.GetUser().ProviderUserKey:"" %>'
                                        ID="UserLabel" Visible="false" runat="server" Text='<%# Bind("UserID") %>' />
                                </td>
                            </tr>         
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="ForumPostThankOwR" runat="server" OwText="ForumPostThankLabel" />
                                </td>
                                <td>
                                    <owc:OwComboBox SkinID="owCombobox" ID="OwForumPostCbb" runat="server" DataSourceID="OwForumPostOds"
                                        DataTextField="Title" DataValueField="ForumPostID" AppendDataBoundItems="True" SelectedValue='<%# Bind("ForumPostID") %>'>
                                    </owc:OwComboBox>
                                    <owc:OwOds ID="OwForumPostOds" runat="server" OldValuesParameterFormatString="original_{0}"
                                        OwBLLClassName="" OwSelectMethod="" SelectMethod="OwGetByDynamic" 
                                        TypeName="Micronet.OpenWeb.Com.BLL.OwForumPostsBLL" 
                                        DataObjectTypeName="Micronet.OpenWeb.Entity.OwForumPostsEntity" 
                                        DeleteMethod="OwDelete" InsertMethod="OwInsert" UpdateMethod="OwUpdate">
                                        <SelectParameters>
                                            <asp:Parameter DbType="Guid" Name="userID" />
                                            <asp:Parameter Name="isApproved" Type="Boolean" />
                                            <asp:Parameter DefaultValue="false" Name="isDeleted" Type="Boolean" />
                                            <asp:Parameter Name="continentID" Type="Int64" />
                                            <asp:Parameter Name="countryID" Type="Int64" />
                                            <asp:Parameter Name="provinceID" Type="Int64" />
                                            <asp:Parameter Name="districtID" Type="Int64" />
                                            <asp:Parameter Name="wardID" Type="Int64" />
                                            <asp:Parameter Name="companyID" Type="Int64" />
                                            <asp:Parameter Name="forumThreadID" Type="Int64" />
                                            <asp:Parameter Name="sortClause" Type="String" />
                                            <asp:Parameter Name="sortDirection" Type="String" />
                                            <asp:Parameter Name="startRowIndex" Type="Int32" />
                                            <asp:Parameter Name="maximumRows" Type="Int32" />
                                        </SelectParameters>
                                    </owc:OwOds>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR ID="DateTimeThankedOwR" runat="server" OwText="DateTimeThankedLabel" OwSuffix=":"></owc:OwR>
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="DateTimeThankedTxt" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue='<%$ Ow: DateTime.Now %>' OwUsedForEdit="False" Text='<%# Bind("DateTimeThanked") %>'>
                                    </owc:OwTextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>                               
                <br />
                <br />
                <br />
                <br />
            </InsertItemTemplate>
            <EditItemTemplate>
                <fieldset>
                    <legend><span>
                        <owc:OwR ID="InfoLabel" runat="server" OwText="InfoLabel"></owc:OwR>
                    </span></legend>
                    <div>
                        <table width="100%">     
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="OwUserName" runat="server" OwText="UserName" />
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="txtUser" runat="server" Enabled="False" Width="200px"
                                        OwUsedForEdit="False" Text='<%# Bind("UserID") %>'>
                                    </owc:OwTextBox>
                                    <owc:OwTextBox SkinID="owTextBox"
                                        ID="UserLabel" Visible="false" runat="server" Text='<%# Bind("UserID") %>' />
                                </td>
                            </tr>         
                            <tr>
                                <td class="leftcolumn">
                                    <owc:OwR ID="ForumPostThankOwR" runat="server" OwText="ForumPostThankLabel" />
                                </td>
                                <td>
                                    <owc:OwComboBox SkinID="owCombobox" ID="OwForumPostCbb" runat="server" DataSourceID="OwForumPostOds"
                                        DataTextField="Title" DataValueField="ForumPostID" AppendDataBoundItems="True" SelectedValue='<%# Bind("ForumPostID") %>'>
                                    </owc:OwComboBox>
                                    <owc:OwOds ID="OwForumPostOds" runat="server" OldValuesParameterFormatString="original_{0}"
                                        OwBLLClassName="" OwSelectMethod="" SelectMethod="OwGetByDynamic" 
                                        TypeName="Micronet.OpenWeb.Com.BLL.OwForumPostsBLL">
                                        <SelectParameters>
                                            <asp:Parameter DbType="Guid" Name="userID" />
                                            <asp:Parameter Name="isApproved" Type="Boolean" />
                                            <asp:Parameter DefaultValue="false" Name="isDeleted" Type="Boolean" />
                                            <asp:Parameter Name="continentID" Type="Int64" />
                                            <asp:Parameter Name="countryID" Type="Int64" />
                                            <asp:Parameter Name="provinceID" Type="Int64" />
                                            <asp:Parameter Name="districtID" Type="Int64" />
                                            <asp:Parameter Name="wardID" Type="Int64" />
                                            <asp:Parameter Name="companyID" Type="Int64" />
                                            <asp:Parameter Name="forumThreadID" Type="Int64" />
                                            <asp:Parameter Name="sortClause" Type="String" />
                                            <asp:Parameter Name="sortDirection" Type="String" />
                                            <asp:Parameter Name="startRowIndex" Type="Int32" />
                                            <asp:Parameter Name="maximumRows" Type="Int32" />
                                        </SelectParameters>
                                    </owc:OwOds>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <owc:OwR ID="DateTimeThankedOwR" runat="server" OwText="DateTimeThankedLabel" OwSuffix=":"></owc:OwR>
                                </td>
                                <td>
                                    <owc:OwTextBox SkinID="owTextBox" ID="DateTimeThankedTxt" runat="server" Enabled="False"
                                        Width="200px" OwDefaultValue='<%$ Ow: DateTime.Now %>' OwUsedForEdit="False" Text='<%# Bind("DateTimeThanked") %>'>
                                    </owc:OwTextBox>
                                </td>
                            </tr>
                        </table>
                    </div>
                </fieldset>    
                <br />
                <br />
                <br />
                <br /> 
            </EditItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField ShowHeader="False">
            <EditItemTemplate>
                <fieldset style="position: fixed; bottom: 0px; right: 0px; width: 100%">
                    <legend>
                        <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ OwR: Action %>" /></legend>
                    <owc:OwButton ID="EditUpdateThenCloseButton" runat="server" CommandName="Update"
                        Text='<%$OwR:Update %>' OnClientClicking="showNotification">
                    </owc:OwButton>
                    &nbsp;
                    <owc:OwConfirmButton ID="EditDeleteButton" runat="server" CausesValidation="True"
                        CommandName="Delete" Text="<%$OwR:Delete %>" SkinID="OwConfirmButton">
                    </owc:OwConfirmButton>
                    &nbsp;<owc:OwButton ID="EditCancelButton" runat="server" CausesValidation="False"
                        CommandName="Cancel" Text="<%$OwR:Cancel %>">
                    </owc:OwButton>
                </fieldset>
            </EditItemTemplate>
            <InsertItemTemplate>
                <fieldset style="position: fixed; bottom: 0px; right: 0px; width: 100%">
                    <legend>
                        <asp:Label ID="Label4" runat="server" EnableViewState="false" Text="<%$ OwR: Action %>" /></legend>
                    <owc:OwButton ID="InsertInsertButton" runat="server" CommandName="Insert" Text="<%$OwR:Insert %>"
                        OnClientClicking="showNotification">
                    </owc:OwButton>
                    &nbsp;<owc:OwButton ID="InsertCancelButton" runat="server" CausesValidation="False"
                        CommandName="Cancel" Text="<%$OwR:Cancel %>">
                    </owc:OwButton>
                </fieldset>
            </InsertItemTemplate>
        </asp:TemplateField>
    </Fields>
</owc:OwDetailsView>
<owc:OwObjectDataSource ID="ForumPostThankEditOds" runat="server" DataObjectTypeName="Micronet.OpenWeb.Entity.OwForumPostThanksEntity"
    DeleteMethod="OwDelete" InsertMethod="OwInsert" OldValuesParameterFormatString="original_{0}"
    SelectMethod="OwGetEntity" TypeName="Micronet.OpenWeb.Com.BLL.OwForumPostThanksBLL" UpdateMethod="OwUpdate">
    <SelectParameters>
        <asp:QueryStringParameter Name="ForumPostThanksID" QueryStringField="<%$ Ow:OwConstants.QueryString.ID %>" />
    </SelectParameters>
</owc:OwObjectDataSource>